package com.imooc.article.service;

import com.imooc.utils.PagedGridResult;

public interface CommentPortalService {

    /**
     * 发表评论
     * @param articleId
     * @param userId
     * @param nickName
     * @param fathCommentId
     * @param content
     */
    void createComment(String articleId,
                       String userId,
                       String nickName,
                       String face,
                       String fathCommentId,
                       String content);

    /**
     * 获取文章的评论数
     * @param articleId
     * @return
     */
    Integer getCommentCounts(String articleId);

    /**
     * 分页查询文章的评论数
     * @param articleId
     * @param page
     * @param pageSize
     * @return
     */
    PagedGridResult getCommentsList(String articleId,
                                    Integer page,
                                    Integer pageSize);

    PagedGridResult commnetMng(String writerId,
                               Integer page,
                               Integer pageSize);

    void deleteComments(String writerId,
                        String commentId);
}
